import { _decorator, Component, log, Node } from 'cc';
const { ccclass, property } = _decorator;

// 形状名称及属性
export const BLOCK_SHAPE = {
    squareShape: [//田字
        [[0,0, 0,0],
         [0,1, 1,0],
         [0,1, 1,0],
         [0,0, 0,0]], 
         
        // [[0,0, 0,0],
        //  [0,1, 1,0],
        //  [0,1, 1,0],
        //  [0,0, 0,0]],
        // [[0,0, 0,0],
        //  [0,1, 1,0],
        //  [0,1, 1,0],
        //  [0,0, 0,0]],
        // [[0,0, 0,0],
        //  [0,1, 1,0],
        //  [0,1, 1,0],
        //  [0,0, 0,0]]

        // [[0, 0], [0, 1], [1, 0], [1, 1]]
    ],
    lineShape: [//直线形
    [[0,0, 0,0],
    [0,0, 0,0],
    [1,1, 1,1],
    [0,0, 0,0]], 
    [[0,0, 1,0],
    [0,0, 1,0],
    [0,0, 1,0],
    [0,0, 1,0]],
    //#region 
   [[0,0, 0,0],
    [0,0, 0,0],
    [1,1, 1,1],
    [0,0, 0,0]],
   [[0,0, 1,0],
    [0,0, 1,0],
    [0,0, 1,0],
    [0,0, 1,0]]
        // [[0, 0], [-1, 0], [1, 0], [2, 0]],
        // [[0, 0], [0, -1], [0, 1], [0, 2]]
        //#endregion
    ],
    tShape: [//T形
    [[0,0, 0,0],
    [0,1, 1,1],
    [0,0, 1,0],
    [0,0, 0,0]], 
   [[0,0, 1,0],
    [0,0, 1,1],
    [0,0, 1,0],
    [0,0, 0,0]],
   [[0,0, 0,0],
    [0,0, 1,0],
    [0,1, 1,1],
    [0,0, 0,0]],
   [[0,0, 0,1],
    [0,0, 1,1],
    [0,0, 0,1],
    [0,0, 0,0]]
        // [[0, 0], [-1, 0], [1, 0], [0, -1]],
        // [[0, 0], [0, 1], [1, 0], [0, -1]],
        // [[0, 0], [-1, 0], [0, 1], [1, 0]],
        // [[0, 0], [-1, 0], [0, 1], [0, -1]]
    ],
    zShape: [//Z形
        [[0,0, 0,0],
         [0,1, 1,0],
         [0,0, 1,1],
         [0,0, 0,0]], 
        [[0,0, 1,0],
         [0,1, 1,0],
         [0,1, 0,0],
         [0,0, 0,0]],

         //#region 
         [[0,0, 0,0],
         [0,1, 1,0],
         [0,0, 1,1],
         [0,0, 0,0]], 
        [[0,0, 1,0],
         [0,1, 1,0],
         [0,1, 0,0],
         [0,0, 0,0]],
        // [[0, 0], [-1, 0], [0, -1], [1, -1]],
        // [[0, 0], [0, -1], [1, 0], [1, 1]]
        //#endregion
    ],
    zShapeMirror: [//Z镜像
        [[0,0, 0,0],
        [0,0, 1,1],
        [0,1, 1,0],
        [0,0, 0,0]], 
        [[0,1, 0,0],
        [0,1, 1,0],
        [0,0, 1,0],
        [0,0, 0,0]],

        //#region 
        [[0,0, 0,0],
        [0,0, 1,1],
        [0,1, 1,0],
        [0,0, 0,0]], 
        [[0,1, 0,0],
        [0,1, 1,0],
        [0,0, 1,0],
        [0,0, 0,0]],
        // [[0, 0], [1, 0], [0, -1], [-1, -1]],
        // [[0, 0], [0, 1], [1, 0], [1, -1]]
        //#endregion
    ],
    lShape: [//L形
        [[0,1, 0,0],
         [0,1, 0,0],
         [0,1, 1,0],
         [0,0, 0,0]],
        [[0,0, 0,0],
         [0,1, 1,1],
         [0,1, 0,0],
         [0,0, 0,0]],
        [[0,1, 1,0],
         [0,0, 1,0],
         [0,0, 1,0],
         [0,0, 0,0]],
        [[0,0, 0,0],
         [0,0, 0,1],
         [0,1, 1,1],
         [0,0, 0,0]],
        // [[0,0],[0,1],[1,0],[2,0]],
        // [[0,0],[0,1],[0,2],[-1,0]],
        // [[0,0],[0,-1],[-1,0],[-2,0]],
        // [[0,0],[1,0],[0,-1],[0,-2]]
    ],
    lShapeMirror: [//L镜像
        [[0,0, 0,0],
         [0,0, 0,1],
         [0,1, 1,1],
         [0,0, 0,0]],
        [[0,0, 1,1],
         [0,0, 0,1],
         [0,0, 0,1],
         [0,0, 0,0]],
        [[0,0, 0,0],
         [0,1, 1,1],
         [0,1, 0,0],
         [0,0, 0,0]],
        [[0,1, 0,0],
         [0,1, 0,0],
         [0,1, 1,0],
         [0,0, 0,0]],
        // [[0,0],[0,1],[-1,0],[-2,0]],
        // [[0,0],[0,-1],[0,-2],[-1,0]],
        // [[0,0],[0,-1],[1,0],[2,0]],
        // [[0,0],[1,0],[0,1],[0,2]]
    ]}

@ccclass('Shape')
export class Shape extends Component {
    start() {
        // this.getDiamonds();
    }
    
    update(deltaTime: number) {
        
    }
}


